package com.hdq.mapper;

import com.github.pagehelper.Page;
import com.hdq.annotation.AutoFill;
import com.hdq.annotation.ManagerName;
import com.hdq.enumeration.OperationType;
import entity.Coupon;
import org.apache.ibatis.annotations.Mapper;
import vo.CouponPageVO;

import java.util.List;

@Mapper
public interface CouponMapper {
    Page<CouponPageVO> selectByPage();

    @AutoFill(OperationType.INSERT)
    @ManagerName(OperationType.INSERT)
    void insert(Coupon coupon);

    void delete(List<Long> ids);
    @AutoFill(OperationType.UPDATE)
    @ManagerName(OperationType.UPDATE)
    void update(Coupon coupon);

//    查询是否存在过期优惠卷

    List<Coupon> selectByExpired();

    List<Coupon> selectByNotStart();

    List<Coupon> selectByStart();
}
